<?php 
$cant = 0;
foreach ($derivadas as $derivada) {
    if($derivada['cerrada'] == 0 && empty($derivada['derivada'])) {
        $cant++;
    }
}
if($cant > 0) { ?>
<table class="table table-striped">
    <thead>
        <tr>
            <th>#</th>
            <th>Descripci&oacute;n</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($derivadas as $derivada) { ?>
        <?php if($derivada['cerrada'] == 0 && empty($derivada['derivada'])) { ?>
        <tr>
            <td><?=$derivada['idnc']?></td>
            <td><a href="/derivada/crear/<?=$derivada['idnc']?>"><?=$derivada['descripcion']?></a></td>
        </tr>
        <?php } ?>
        <?php } ?>
    </tbody>
</table>
<?php } else { ?>
<div class="alert alert-success"><h4><strong>No hay NC Derivadas</strong></h4></div>
<?php } ?>
